package simplefactory;

/**
 * @Author Fish Paradise
 * @Description
 * @Date 2019/1/16  9:46
 **/
public class FruitTest {
    public static void main(String[] args) {
        Fruit fruit = new FruitFactory("Apple").getFruit();
        fruit.sayName();
        fruit.sayColor();
        Fruit fruit1 = new FruitFactory("Orange").getFruit();
        fruit1.sayName();
        fruit1.sayColor();

        Fruit fruit2 = new FruitReflectFactory("Apple").getFruit();
        fruit2.sayName();
        fruit2.sayColor();
    }
}
